package independence.reflection
{
	/**
	 * PropertyAccessError is a ReflectionError subclass thrown when a property is
	 * illegally read or written to. 
	 * 
	 * @author	TK, TK Assembled for Independence Glory.
	 */
	public class PropertyAccessError extends ReflectionError
	{
		/**
		 * Constructs a new PropertyAccessError.
		 * @param	propertyName	The name of the property affected.
		 * @param	className		The fully-qualified name of the class which defines the property.
		 * @param	invalidAccess	The type of invalid access attempted, see the constants defined under PropertyAccess.
		 */
		public function PropertyAccessError(propertyName:String, className:String, invalidAccess:String)
		{
			super("Independence cannot " + (invalidAccess == PropertyAccess.READ ? "read from" 
				: "write to") + " \"" + propertyName + "\" in: \"" + className
				+ "\", property is " + invalidAccess + " only.", 104);
		}
		
	}
}